<template>
  <el-cascader
    :options="options"
    :value="value"
    @input="handleInput"
    @focus="handleFocus"
    @blur="handleBlur"
    @change="handleChange"
  />
</template>

<script>
import selectComponents from './selectComponents'
import { getCityTree } from '@/api/base/orgUser'
import { getTrees } from '@/utils'

export default {
  name: 'AccountStatus',
  mixins: [selectComponents],
  props: {
    value: [String, Array],
    disabled: {
      type: Boolean,
      default() {
        return false
      }
    }
  },
  data() {
    return {
      options: []
    }
  },
  created() {
    this.loadData()
  },
  methods: {
    loadData() {
      getCityTree().then(res => {
        this.options = getTrees(res.data, 0)
      })
    }
  }
}
</script>
